import { defineStore } from "pinia";
import { imList } from "../api/images";
export const useImgStore = defineStore("img", {
  state() {
    return {
      imgInfo: [],
    };
  },
  actions: {
    getImgInfo(id) {
      imList(id)
        .then((res) => {
          this.imgInfo = res;
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
});
